{% extends "layout.html" %}
{% block content %}
<div class="main-content">
		<div class="container-fluid" style="padding-bottom:54px">
			<div class="pos-box bgw mtb15">
				<div class="position f14 c9 pull-left">
					<a class="plr10 c4" href="/">首页</a>/<span class="plr10 c4">面板设置</span>
				</div>
			</div>
			<div class="clearfix bgw mtb15 pd15">
				<div class="safe-port pull-left">
					
					<div class="ss-text pull-left mr50">
						<em>关闭面板</em>
						<div class="ssh-item">
	                        <input class="btswitch btswitch-ios" id="closePl" type="checkbox">
	                        <label class="btswitch-btn" for="closePl" onclick="closePanel()"></label>
	                    </div>
					</div>

					<div class="ss-text pull-left mr50">
						<em>开发模式</em>
						<div class="ssh-item">
	                        <input class="btswitch btswitch-ios" id="debugMode" type="checkbox" {{data['debug']}}>
	                        <label class="btswitch-btn" for="debugMode" onclick="debugMode()"></label>
	                    </div>
					</div>

					<div class="ss-text pull-left mr50">
	                    <em title="开启后允许使用ipv6访问面板">监听IPv6</em>
	                    <div class='ssh-item'>
	                        <input class='btswitch btswitch-ios' id='panelIPv6' type='checkbox' {{data['ipv6']}}>
	                        <label class='btswitch-btn' for='panelIPv6' onclick="setIPv6()"></label>
	                    </div>
	                </div>

	                <!--
					<div class="ss-text pull-left mr50">
						<em class="btlink" style="color: #20a53a;" onclick="getPanelSSL()" title="点击自定义面板证书">面板SSL</em>
						<div class='ssh-item'>
							<input class='btswitch btswitch-ios' id='panelSSL' type='checkbox' {{data['ssl']}}>
							<label class='btswitch-btn' for='panelSSL' onclick="setPanelSSL()"></label>
						</div>
					</div>
					-->
				</div>
			</div>
			<div class="setbox bgw mtb15">
				<div class="title c6 plr15">
					<h3 class="f16">设置</h3>
				</div>
				<div class="info-title-tips" style="margin: 20px 30px 0px;">
					<p>
						<span class="glyphicon glyphicon-alert" style="color: #f39c12; margin-right: 10px;">
						</span>为了提高安全，请修改别名、默认端口、面板用户和密码!</p>
				</div>
				<div class="setting-con pd15">
					<form id="set_config">
						<p class="mtb15">
							<span class="set-tit text-right">别名</span>
							<input id="webname" name="webname" class="inputtxt bt-input-text" type="text" value="{{data['title']}}" ><span class="set-info c7">面板名称</span>
						</p>
						<p class="mtb15">
							<span class="set-tit text-right">面板端口</span>
							<input id="banport" name="port" class="inputtxt bt-input-text" type="numner" value="{{data['port']}}" maxlength="5"><span class="set-info c7">建议端口范围7200 - 65535</span>
						</p>

						<p class="mtb15">
							<span class="set-tit text-right">安全入口</span>
							<input id="admin_path" name="admin_path" class="inputtxt bt-input-text disable" type="text" value="{{data['admin_path']}}"><span class="modify btn btn-xs btn-success" onclick="modifyAuthPath();">修改</span>
							<span class="set-info c7">面板管理入口,设置后只能通过指定安全入口登录面板,如: /abc</span>
						</p>

						<!--
						<p class="mtb15">
							<span class="set-tit text-right">域名</span>
							<input name="domain" class="inputtxt bt-input-text" type="text" value="">
							<span class="set-info c7">为面板绑定一个访问域名;注意：一旦绑定域名,只能通过域名访问面板!</span>
						</p>
						-->

						<p class="mtb15">
							<span class="set-tit text-right" title="默认建站目录">默认建站目录</span>
							<input name="sites_path" class="inputtxt bt-input-text" type="text" value="{{data['site_path']}}">
							<span class="set-info c7">新创建的站点,默认将保存到该目录的下级目录!</span>
						</p>

						<p class="mtb15">
							<span class="set-tit text-right" title="默认建站目录">默认备份目录</span>
							<input name="backup_path" class="inputtxt bt-input-text" type="text" value="{{data['backup_path']}}">
							<span class="set-info c7">网站和数据库的备份目录!</span>
						</p>

						<p class="mtb15">
							<span class="set-tit text-right" title="服务器IP">服务器IP</span>
							<input name="host_ip" class="inputtxt bt-input-text" type="text" value="{{data['ip']}}">
							<span class="set-info c7">默认为外网IP,若您在本地虚拟机测试,请填写虚拟机内网IP!</span>
						</p>
			
						<p class="mtb15">
							<span class="set-tit text-right" title="服务器时间">服务器时间</span>
							<input id="systemdate" name="systemdate" class="inputtxt bt-input-text disable" type="text" value="{{data['systemdate']}}"><span class="modify btn btn-xs btn-success" onclick="syncDate()">同步</span>
						</p>
						<p class="mtb15">
							<span class="set-tit text-right" title="面板用户">面板用户</span>
							<input name="username_" class="inputtxt bt-input-text disable" type="text" value="{{data['username']}}" disabled><span class="modify btn btn-xs btn-success" onclick="setUserName()">修改</span>
						</p>
						<p class="mtb15">
							<span class="set-tit text-right" title="面板密码">面板密码</span>
							<input name="password_" class="inputtxt bt-input-text disable" type="text" value="******" disabled><span class="modify btn btn-xs btn-success" onclick="setPassword()">修改</span>
						</p>
					</form>
					<div class="bt-submit set-submit">保存</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script src="/static/app/config.js?v={{config.version}}"></script>
{% endblock %}